// pages/voluntary-activity/voluntary-activity.js
const app = getApp()
Page({


  /**
   * 页面的初始数据
   */
  data: {
    contentHeight: 721,
    searchActive: "",
    swiperList: [{
      id: 0,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84000.jpg'
    }, {
      id: 1,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big84001.jpg',
    }, {
      id: 2,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big39000.jpg'
    }, {
      id: 3,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg'
    }, {
      id: 4,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big25011.jpg'
    }, {
      id: 5,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big21016.jpg'
    }, {
      id: 6,
      type: 'image',
      url: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg'
    }],
    functionality: [
      {
        id: "provide-proof",
        icon: "poea-prove",
        explain: "开证明"
      },
      {
        id: "more-activity",
        icon: "poea-moreActive",
        explain: "找活动"
      },
      {
        id: "join-team",
        icon: "poea-trem",
        explain: "加团队"
      },
    ]
  },

  // 返回
  onNavBackTap() {
    wx.redirectTo({
      url: "/pages/main-home/main-home"
    })
  },

  onTabAction(event) {
    const type = event.type
    if (type === 'focus') {
      this.setData({ searchActive: "active" })

    }
    if (type === 'blur') {
      this.setData({ searchActive: "" })

    }
  },

  xxxx() { },


  DotStyle(e) {
    this.setData({
      DotStyle: e.detail.value
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    // console.log(app);
    this.setData({
      contentHeight: app.globalData.contentHeight
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})